﻿using System;
using System.Web.UI.WebControls;

namespace Evpo.ContactData.UI.GeneralClasses
{
    public abstract class ItemInList : System.Web.UI.UserControl
    {
        public ItemInList()
        {
            CanBeSelected = false;
        }

        #region Fields
        #endregion

        #region Properties
        protected abstract HiddenField IDControl
        {
            get;
        }

        protected abstract CheckBox SelectionControl
        {
            get;
        }

        public int ItemID
        {
            get
            {
                return Int32.Parse(IDControl.Value);
            }
        }

        public bool IsSelected
        {
            get
            {
                return SelectionControl.Checked;
            }
        }

        public bool CanBeSelected
        {
            get;
            set;
        }
        #endregion

        #region Methods
        #endregion Methods
    }
}
